SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO


CREATE PROCEDURE dbo.DnnProduct_GetFiles
	@FolderID int
AS
BEGIN
	SELECT 
		FileId,
		FO.PortalId,
		[FileName],
		Extension,
		Size,
		Width,
		Height,
		ContentType,
		F.FolderID,
		FolderPath AS 'Folder',
		StorageLocation,
		IsCached,
		FolderMappingID,
		LastModificationTime
	FROM dbo.[DnnProduct_Files] F
	INNER JOIN dbo.[DnnProduct_Folders] FO ON F.FolderID = FO.FolderID
	WHERE F.FolderID = @FolderID
	ORDER BY [FileName]
END
GO
